<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets">    
    <h:body>
        <ui:composition template="templates/template.xhtml">
            <ui:define name="title">Nouvelle catégorie - Administration ShopEasy</ui:define>
            <ui:define name="content">
                <section class="wrapper style2">
                    <div class="container">
                        <div id="content">
                            <h:form>                                
                                <p:fieldset id="fCategorie" legend="Nouvelle categorie" style="margin-bottom:20px;">
                                    <p:messages id="messages" />

                                    <h:panelGrid columns="2" cellpadding="5">
                                        <p:outputLabel for="categorie" value="Libellé:" style="margin-right: 45px" />
                                        <p:inputText id="categorie" value="#{vueAjoutCategorie.categorie.libelle}" required="true" />

                                        <p:outputLabel for="descriptioncat" value="Description:" style="margin-right: 33px"/>
                                        <p:inputTextarea id="descriptioncat" cols="50" value="#{vueAjoutCategorie.categorie.description}" required="true" />
                                    </h:panelGrid>                                  

                                    <p:commandButton value="Ajouter" update="fCategorie" actionListener="#{vueAjoutCategorie.ajouterCategorie()}"/>
                                </p:fieldset>
                            </h:form>                            
                        </div>
                    </div>
                </section>
            </ui:define>
        </ui:composition>
    </h:body>
</html>